import Vue from 'vue'
import VueRouter from 'vue-router'
import Started from '../views/Started'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Started',
    component: Started,
    meta: {
      title: '起步'
    }
  },
  {
    path: '/nodeAndEdge',
    name: 'NodeAndEdge',
    component: () => import(/* webpackChunkName: "nodeAndEdge" */ '../views/NodeAndEdge'),
    meta: {
      title: '节点和边'
    }
  },
  {
    path: '/modes',
    name: 'Modes',
    component: () => import(/* webpackChunkName: "modes" */ '../views/Modes'),
    meta: {
      title: '交互模式'
    }
  },
  {
    path: '/createGraphFromDrag',
    name: 'CreateGraphFromDrag',
    component: () => import(/* webpackChunkName: "createGraphFromDrag" */ '../views/CreateGraphFromDrag'),
    meta: {
      title: '拖拽生成图形'
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
